package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.WcPatentApplicationAncillary;
import com.ruoyi.system.mapper.WcPatentApplicationAncillaryMapper;
import com.ruoyi.system.service.IWcPatentApplicationAncillaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 剧本梗概备案申请附件Service业务层处理
 *
 * @author ruoyi
 * @date 2024-02-28
 */
@Service
public class WcPatentApplicationAncillaryServiceImpl extends ServiceImpl<WcPatentApplicationAncillaryMapper, WcPatentApplicationAncillary> implements IWcPatentApplicationAncillaryService
{
    @Autowired
    private WcPatentApplicationAncillaryMapper wcPatentApplicationAncillaryMapper;

    /**
     * 查询剧本梗概备案申请附件
     *
     * @param wcPatentApplicationId 剧本梗概备案申请附件主键
     * @return 剧本梗概备案申请附件
     */
    @Override
    public WcPatentApplicationAncillary selectWcPatentApplicationAncillaryByWcPatentApplicationId(Long wcPatentApplicationId)
    {
        return wcPatentApplicationAncillaryMapper.selectWcPatentApplicationAncillaryByWcPatentApplicationId(wcPatentApplicationId);
    }

    /**
     * 查询剧本梗概备案申请附件列表
     *
     * @param wcPatentApplicationAncillary 剧本梗概备案申请附件
     * @return 剧本梗概备案申请附件
     */
    @Override
    public List<WcPatentApplicationAncillary> selectWcPatentApplicationAncillaryList(WcPatentApplicationAncillary wcPatentApplicationAncillary)
    {
        return wcPatentApplicationAncillaryMapper.selectWcPatentApplicationAncillaryList(wcPatentApplicationAncillary);
    }

    /**
     * 新增剧本梗概备案申请附件
     *
     * @param wcPatentApplicationAncillary 剧本梗概备案申请附件
     * @return 结果
     */
    @Override
    public int insertWcPatentApplicationAncillary(WcPatentApplicationAncillary wcPatentApplicationAncillary)
    {
        return wcPatentApplicationAncillaryMapper.insertWcPatentApplicationAncillary(wcPatentApplicationAncillary);
    }

    /**
     * 修改剧本梗概备案申请附件
     *
     * @param wcPatentApplicationAncillary 剧本梗概备案申请附件
     * @return 结果
     */
    @Override
    public int updateWcPatentApplicationAncillary(WcPatentApplicationAncillary wcPatentApplicationAncillary)
    {
        return wcPatentApplicationAncillaryMapper.updateWcPatentApplicationAncillary(wcPatentApplicationAncillary);
    }

    /**
     * 批量删除剧本梗概备案申请附件
     *
     * @param wcPatentApplicationIds 需要删除的剧本梗概备案申请附件主键
     * @return 结果
     */
    @Override
    public int deleteWcPatentApplicationAncillaryByWcPatentApplicationIds(String wcPatentApplicationIds)
    {
        return wcPatentApplicationAncillaryMapper.deleteWcPatentApplicationAncillaryByWcPatentApplicationIds(Convert.toStrArray(wcPatentApplicationIds));
    }

    /**
     * 删除剧本梗概备案申请附件信息
     *
     * @param wcPatentApplicationId 剧本梗概备案申请附件主键
     * @return 结果
     */
    @Override
    public int deleteWcPatentApplicationAncillaryByWcPatentApplicationId(Long wcPatentApplicationId)
    {
        return wcPatentApplicationAncillaryMapper.deleteWcPatentApplicationAncillaryByWcPatentApplicationId(wcPatentApplicationId);
    }
}
